import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'index',
      component: (index) => require(['@/components/Index'], index),
      meta: {
        title: '主页'
      }
    },
    {
      path: '/login',
      name: 'login',
      component: (login) => require(['@/components/Login'], login),
      meta: {
        title: '登录'
      }
    },
    {
      path: '/infoWrite',
      name: 'InfoWrite',
      component: (InfoWrite) => require(['@/components/user/InfoWrite'], InfoWrite),
      meta: {
        title: '信息修改'
      }
    },
    {
      path: '/editorPass',
      name: 'EditorPass',
      component: (EditorPass) => require(['@/components/user/EditorPass'], EditorPass),
      meta: {
        title: '密码修改'
      }
    },
    {
      path: '/reg',
      name: 'reg',
      component: (reg) => require(['@/components/Reg'], reg),
      meta: {
        title: '注册'
      }
    },
    {
      path: '/group',
      name: 'group',
      component: (GroupJoin) => require(['@/components/user/GroupJoin'], GroupJoin),
      meta: {
        title: '项目组详情'
      }
    },
    {
      path: '/onLineTest',
      name: 'onLineTest',
      component: (InterfaceTest) => require(['@/components/api/InterfaceTest'], InterfaceTest),
      meta: {
        title: '在线调试'
      }
    }
  ]
})
